<template>
  <div>
    <Hometop></Hometop>
    <div class="bannatop">
      <img src="../../static/images/myselfdataTop_new.png"
           alt=""
           style="width: 100vw; height: 24vw; margin-top: 46px" />
    </div>
    <div class="content">
      <div class="conttop">
        <img src="../../static/images/pepole.png"
             alt=""
             width="83px"
             style="border-radius: 100px; margin-left: 12px; margin-top: -10px" />
        <div class="right">
          <p class="rittop">
            <span>
              <p>--</p>
              <p>粉丝</p>
            </span>
            <span class="list"></span>
            <span>
              <p>15</p>
              <p>关注</p>
            </span>
            <span class="list"></span>
            <span>
              <p>--</p>
              <p>获赞</p>
            </span>
          </p>
          <p class="editdata">
            <span @click="editClick">编辑资料</span>
          </p>
        </div>
      </div>
    </div>
    <div class="contbttom">
      <div class="name">{{$store.state.name}}</div>
      <div class="datas">
        <span>这个人很神秘,什么都没有写</span>
        <span style="color: #1389bf"
              @click="spantextClick">{{
          datasspantext
        }}</span>
      </div>
      <div class="tag"
           v-if="flat">
        <span style="font-size: 12px">uid:318387119</span>
      </div>
    </div>
    <div class="botcontent">
      <div class="bcttop">
        <span @click="hanleClick"
              ref="span">动态</span>
        <span @click="hanleClick2"
              ref="span2">视频</span>
      </div>
      <div class="bcttopdata"
           v-if="spanflat"
           style="background-color: #ccc">
        <p style="text-align: center">到达动态的尽头惹 ~</p>
        <div class="mfooter">
          <p>信息网络传播视听节目许可证：0910417</p>
          <p>网络文化经营许可证 沪网文【2019】3804-274号</p>
          <p>广播电视节目制作经营许可证：（沪）字第01248号</p>
          <p>增值电信业务经营许可证 沪B2-20100043</p>
        </div>
      </div>
      <div class="bcttopdata"
           v-else
           style="text-align: center">
        <img src="../../static/images/noContent.png"
             alt=""
             style="width: 74.66667vw; margin-top: 95px" />
        <p style="font-size: 16px; text-align: center">
          <span>快去发现<span style="color: #fb7299">新内容</span>吧!</span>
        </p>
      </div>
    </div>
  </div>
</template>
<script>
import Hometop from '../../components/common/Hometop'
export default {
  data: () => ({
    datasspantext: '展开',
    flat: false,
    spanflat: true
  }),
  methods: {
    spantextClick () {
      this.flat = !this.flat
      if (this.flat === true) {
        this.datasspantext = '收起'
      } else {
        this.datasspantext = '展开'
      }
    },
    hanleClick () {
      this.spanflat = true
      this.$refs.span.style.color = '#fb7299'
      this.$refs.span2.style.color = ''
    },
    hanleClick2 () {
      this.spanflat = false
      this.$refs.span2.style.color = '#fb7299'
      this.$refs.span.style.color = ''
    },
    editClick () {
      this.$router.push('/home/myselfdata/editdata')
    }
  },
  components: {
    Hometop
  }
}
</script>
<style lang="scss" scoped>
.content {
  .conttop {
    display: flex;
    .right {
      width: 210px;
      margin-left: 43px;
      font-size: 14px;
      .rittop {
        display: flex;
        justify-content: space-around;
        text-align: center;
        span {
          p:last-child {
            width: 100%;
            color: #888;
            font-size: 12px;
          }
        }
        .list {
          display: inline-block;
          width: 1px;
          height: 15px;
          margin-top: 9px;
          background-color: #ccc;
        }
      }
      .editdata {
        border: 1px solid #fb7299;
        border-radius: 5px;
        height: 26px;
        text-align: center;
        line-height: 26px;
        color: #fb7299;
        margin-top: 10px;
      }
    }
  }
}
.contbttom {
  margin-left: 13px;
  .name {
    font-size: 18px;
    margin-top: 20px;
  }
  .datas {
    margin-top: 12px;
    font-size: 12px;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    span {
      display: block;
    }
    span:last-child {
      margin-right: 13px;
    }
  }
}
.botcontent {
  border: 1px solid #ccc;
  border-left: none;
  border-right: none;
  height: 35px;
  line-height: 35px;
  font-size: 14px;
  color: #888;
  margin-top: 15px;
  .bcttop {
    display: flex;
    span {
      padding: 0 20px;
    }
  }
  .mfooter {
    text-align: center;
    margin-top: 13px;
    p {
      font-size: 12px;
      height: 25px;
    }
  }
}
</style>
